/*
 * Fuzzyfier3V.cpp
 *
 *  Created on: 07-01-2011
 *      Author: Piotr
 */

#include "AI/fuzzy/Fuzzifier3V.hpp"
#include "AI/fuzzy/FuzzyUtils.hpp"

Fuzzifier3V::Fuzzifier3V(float value, float minValue, float maxValue) :
	value(value)
{
	float sixthPart = (maxValue - minValue) / 6;
	smallMembership = FuzzyValue(FuzzyUtils::getMembershipValueLeftInf(value, minValue + sixthPart,
			minValue + 3 * sixthPart));
	mediumMembership = FuzzyValue(FuzzyUtils::getMembershipValue(value, minValue + sixthPart,
			minValue + 5 * sixthPart));
	bigMembership = FuzzyValue(FuzzyUtils::getMembershipValueRightInf(value,
			minValue + 3 * sixthPart, minValue + 5 * sixthPart));
}

const FuzzyValue& Fuzzifier3V::getSmall() const
{
	return smallMembership;
}

const FuzzyValue& Fuzzifier3V::getMedium() const
{
	return mediumMembership;
}

const FuzzyValue& Fuzzifier3V::getBig() const
{
	return bigMembership;
}
